/**
 * 
 */
package com.coder520.sync_learning.demo;

/**
 * @author zhaoyibo
 *
 */
public class ThreadPriority {
	public static void main(String[] args) {
		Thread t1=new Thread(()->{
			int count1=0;
			while(true) {
				System.out.println("t1");
				count1++;
			}
		});
		
		t1.setPriority(3);
		Thread t2=new Thread(()->{
			int count2=0;
			while(true) {
				System.out.println("t2");
				count2++;
			}
		});
		
		t2.setPriority(10);
		
		t1.start();
		t2.start();
	}
}
